package com.paic.icore.test.demo.util;

/**
 * 描述:
 *
 * @author HUXINGJIE666
 * @date 2017年12月26日下午2:08:40
 */
public interface ReturnCode {

	public String getCode();

	public String getMsg();

	public String getMsg(String code);

	public enum Common implements ReturnCode {

		SUCCESS("000000", "成功"),

		BUSINESS_PROCESS_FAILED("950001", "服务器繁忙"),

		// 40xxx 客户端不合法的请求
		INVALID_PARAM("940001", "字段校验非法"),

		INVALID_REQUEST_MSG("940102", "请求数据非法"),

		RUNTIME_EXCEPTION("950102", "运行时异常"),

		INVALID_REQUEST("940101", "网关拦截-请求方式错误"),

		DIRECT_REQUEST_NOT_SUPPORT("940101", "网关拦截-不允许直接访问");

		public String getCode() {
			return code;
		}

		public String getMsg() {
			return msg;
		}

		public String getMsg(String code) {
			return msg;
		}

		private String code;

		private String msg;

		private Common(String code, String msg) {
			this.code = code;
			this.msg = msg;
		}
	}

}
